package struct;

/**
 * 
 * @author Gabrielle DuBois
 */
public class Ministry extends DBObject{
    private String name;
    private boolean isCom;
    private boolean isAct;
    private String notes;

    /**
     * Constructor
     * @param ministryName
     * @param isCommunityService
     * @param isActive
     * @param additionalNotes
     */
    public Ministry(String ministryName, boolean isCommunityService,
                        boolean isActive, String additionalNotes){

        super(4,1);
        attributes = new Object[numAttributes];
        attributes[0] = name = ministryName;
        attributes[1] = isCom = isCommunityService;
        attributes[2] = isAct = isActive;
        attributes[3] = notes = additionalNotes;

    }//constructor

    /**
     * @see struct.DBObject
     * @return an Object array containing all the attributes that make up an ministry
     *          in the following order: ministryName(String),
     *          isCommunityService(Boolean, isActive(Boolean),
     *          additionalNotes(String)
     */
    public Object[] getAttributes(){
        return attributes;
    }

    /**
     * 
     * @return a String containing the name of the ministry
     */
    public String getMinistryName(){
        return name;
    }

    /**
     * @see struct.DBObject
     * @return A String array containing the ministryName in position 0
     */
    public String[] getKey(){
        String[] key = new String[numInPrimaryKey];
        key[0] = name;

        return key;
    }//getKey()

}//Ministry
